package com.xuecheng.media.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.stereotype.Component;

/**
 * @description minio 配置
 * @author 勾新杰
 * @version 1.0
 * @date 2025/1/20 14:58
 */
@Data
@Component
@ConfigurationProperties(prefix = "minio")
public class MinioProperties {

    /**
     * minio地址
     */
    private String endpoint;

    /**
     * minio账号
     */
    private String accessKey;

    /**
     * minio密码
     */
    private String secretKey;

    /**
     * 存储桶
     */
    @NestedConfigurationProperty
    private Bucket bucket = new Bucket();

    @Data
    public static class Bucket {

        /**
         * 存储桶,图片文件
         */
        private String files;

        /**
         * 存储桶,视频文件
         */
        private String videoFiles;
    }
}
